package com.backend.service.impl;


import com.backend.mapper.UserMapper;
import com.backend.pojo.domain.User;
import com.backend.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userDao;

    @Override
    public List<User> selectAll() {
        return userDao.selectAll();
    }

    @Override
    public User selectById(String userId) {
        return userDao.selectById(userId);
    }

    @Override
    public List<User> selectByConditionMulti(User user) {
        return userDao.selectByConditionMulti(user);
    }

    @Override
    public List<User> selectByConditionSingle(User user) {
        return userDao.selectByConditionSingle(user);
    }

    @Override
    public boolean addUser(User user) {
        userDao.addUser(user);
        return true;
    }

    @Override
    public boolean update(User user) {
        userDao.update(user);
        return true;
    }

    @Override
    public boolean deleteUserById(String userId) {
        userDao.deleteUserById(userId);
        return true;
    }

    @Override
    public boolean deleteManyUserByIds(String[] userIds) {
        userDao.deleteManyUserByIds(userIds);
        return true;
    }
}
